var crypto = require('crypto');

function md5(content) {
	var md5 = crypto.createHash('md5');
	md5.update(content);
	return md5.digest('hex');
}

function toBase64(content) {
	return new Buffer(content).toString('base64');
}

function fromBase64(content) {
	return new Buffer(content, 'base64').toString();
}

exports.md5 = md5;
exports.toBase64 = toBase64;
exports.fromBase64 = fromBase64;
